<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:mvc="http://www.springframework.org/schema/mvc"
	xsi:schemaLocation="
	   	http://www.springframework.org/schema/mvc https://www.springframework.org/schema/mvc/spring-mvc-4.3.xsd
		http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans-4.3.xsd">

	<!--
		View resolution finds the ContentNegotiationManager created by or
		registered with <mvc:annotation-driven>. Or in its absence simply declare it.
	-->

	<bean id="mvcContentNegotiationManager" class="org.springframework.web.accept.ContentNegotiationManagerFactoryBean"/>

	<mvc:view-resolvers>
		<mvc:content-negotiation use-not-acceptable="true">
			<mvc:default-views>
				<bean class="org.springframework.web.servlet.view.json.MappingJackson2JsonView"/>
			</mvc:default-views>
		</mvc:content-negotiation>
		<mvc:bean-name/>
		<mvc:jsp/>
		<mvc:freemarker/>
		<mvc:groovy/>
		<mvc:script-template/>
	</mvc:view-resolvers>

	<mvc:freemarker-configurer>
		<mvc:template-loader-path location="/org/springframework/web/servlet/view"/>
	</mvc:freemarker-configurer>

	<mvc:groovy-configurer/>

	<mvc:script-template-configurer engine-name="nashorn" render-function="render"/>

</beans>
